package thread;

import java.util.Scanner;

public class demo16 {
    public static volatile int isquit = 0;
    public static void main(String[] args) {
        Thread t = new Thread(()-> {
            while (isquit == 0){

            }
            System.out.println("循环结束，t线程退出！");
        });
        t.start();

        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个isquit的值：");
        isquit = sc.nextInt();
        System.out.println("main线程执行完毕！");
    }
}
